<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<div th:replace="include/header::head"></div>

<div th:replace="include/teacher_navbar::navbar(${loginTeacher})"></div>

<div class="container">
	<h1>
		<img th:src="@{/static/img/exam-teacher.png}" /> 上机考试管理
	</h1>

	<form th:if="${application.exam != null}" class="exam-form form-inline" id="addStudentForm" th:action="@{/teacher/student/insert}" method="post">
		<h4>添加单个学生</h4>
		<input type="text" name="number" placeholder="学号*" size="20" />
		<input type="text" name="name" placeholder="姓名*" size="20" />
		<input type="text" name="studentClass" placeholder="班级" size="20" />
		<button type="submit" id="addStudent" class="btn btn-primary"><i class="icon-plus"></i> 添加</button>
	</form>

	<form th:if="${application.exam != null}" class="exam-form form-inline" th:action="@{/teacher/manage/student/search}" method="post">
		<h4>查找学生信息</h4>
		<input type="text" name="number" placeholder="学号" size="20" />
		<input type="text" name="name" placeholder="姓名" size="20" />
		<input type="text" name="studentClass" placeholder="班级" size="20" />
		<button type="submit" class="btn btn-primary"><i class="icon-search"></i> 查找</button>
	</form>

	<div th:if="${application.exam != null}" class="container-fluid">
		<div class="row-fluid" th:if="${studentList != null and studentList.size() > 0}">
				<h4>查找结果</h4>
				<table class="table table-striped table-bordered">
					<thead>
					<tr>
						<th class="span4">学号</th>
						<th class="span4">姓名</th>
						<th class="span3">班级</th>
					</tr>
					</thead>
					<tbody>
						<tr th:each="student : ${studentList}">
							<td th:text="${student.number}"></td>
							<td th:text="${student.name}"></td>
							<td th:text="${student.studentClass}"></td>
						</tr>
					</tbody>
				</table>
		</div>
	</div>

	<div th:if="${application.exam == null}" class="container-fluid">
		<div class="row-fluid">
			<div  class="span12 exam-info">
				<h4><strong>没有考试正在进行~</strong></h4>
			</div>
		</div>
	</div>

</div>

<div th:replace="include/teacher_footer::footer"></div>